namespace Microsoft.Dynamics.AX.Framework.TeamFoundationServerFacade
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    /// ChangeSet
    /// </summary>
    /// <remarks>A wrapper class of Changset from Tfs</remarks>
    [Serializable]
    public class ChangeSet
    {
        private int id;
        private DateTime creationDate;
        private string user;
        private string computerName;
        private string comment;
        //Tfs Changeset consider any changeset are checked-in changeset
        private string status = @"Submitted";
        /// <summary>
        /// changeset id
        /// </summary>
        public int Id
        {
            get { return this.id; }
        }

        /// <summary>
        /// CreationDate
        /// </summary>
        public DateTime CreationDate
        {
            get { return this.creationDate; }
        }

        /// <summary>
        /// User
        /// </summary>
        public string User
        {
            get { return this.user; }
        }

        /// <summary>
        /// ComputerName
        /// </summary>
        public string ComputerName
        {
            get { return this.computerName; }
        }

        /// <summary>
        /// Comment
        /// </summary>
        public string Comment
        {
            get { return this.comment; }
        }

        /// <summary>
        /// Status
        /// </summary>
        public string Status
        {
            get { return this.status; }
        }

        internal ChangeSet(Microsoft.TeamFoundation.VersionControl.Client.Changeset changeset)
        {
            this.id = changeset.ChangesetId;
            this.user = changeset.Owner;
            this.computerName = changeset.Committer;
            this.creationDate = changeset.CreationDate;
            this.comment = String.IsNullOrEmpty(changeset.Comment) ? String.Empty : changeset.Comment;
        }
    }

    /// <summary>
    /// ChangeSetList
    /// </summary>
    [Serializable]
    public class ChangeSetList : List<ChangeSet>
    { }
}
